import axios from '@/libs/api.request'
// 列表
export const productList = data => {
    return axios.request({
      url: '/product/list',
      method: 'post',
      data,
    })
  }

  // 左侧菜单
export const productDelete = data => {
    return axios.request({
      url: '/product/delete',
      method: 'post',
      data,
    })
  }
    //产品类别
    export const productInfo = data => {
        return axios.request({
          url: `/product/info/$(data.id}`,
          method: 'post',
          data,
        })
      }
  //添加产品
  export const productSave = data => {
    return axios.request({
      url: '/product/save',
      method: 'post',
      data,
    })
  }
  //修改
  export const productUpdate = data => {
    return axios.request({
      url: '/product/update',
      method: 'post',
      data,
    })
  }
   //产品类别
   export const productType = data => {
    return axios.request({
      url: '/product/product-type',
      method: 'post',
      data,
    })
  }
  //供应商列表
  export const providerList = data => {
    return axios.request({
      url: '/product/linen-provider',
      method: 'post',
      data,
    })
  }
   //添加供应商
   export const addProvider = data => {
    return axios.request({
      url: '/product/add-provider',
      method: 'post',
      data,
    })
  }